﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PatientInformationExtract.Components
{
    public sealed class Singleton<T> where T:new()
    {
        private T _core;

        private Singleton()
        {
            this._core = new T();
        }

        public static T Instance
        {
            get
            {
                return Nested.instance._core;
            }
        }

        class Nested
        {
            static Nested()
            {
            }

            internal static readonly Singleton<T> instance = new Singleton<T>();
        }
    }
}
